var mongoose = require('../common/db');
var moviesSchema = new mongoose.Schema({
    movieName: String,
    movieImg: String,
    movieVideo: String,
    movieDownload: String,
    movieTime: String,
    movieNumSuppose: Number,
    movieNumDownload: Number,
    movieMainPage: Boolean
});

moviesSchema.statics.findByMovieId = function(m_id, callBack){
    this.findOne({_id:m_id}, callBack);
};

var commentModel = mongoose.model('movie', moviesSchema);

module.exports = commentModel;